<template>
  <div class="toolBar">
    <div class="refresh">
      <v-Refresh></v-Refresh>
    </div>
    <div style="padding-left:15px">
      <el-radio-group v-model="radio2" size="medium" @change="changeLie">
        <el-radio-button key="cpu" label="cpu" >按cpu使用率TOP10</el-radio-button>
        <el-radio-button key="mem" label="mem">按内存使用率TOP10</el-radio-button>
      </el-radio-group>
    </div>
  </div>
</template>

<script>
import bus from "common/bus.js";

import vRefresh from "common/refresh.vue";

export default {
  name: "toolBar",
  props: ["type"],
  components: {
    vRefresh,
  },
  data() {
    return {
        radio2:this.type
    };
  },
  created() {},
  computed: {},
  methods: {
      changeLie(){
          this.$emit("changeLie",this.radio2)
      }
  },
  watch: {},
};
</script>

<style scoped>
.toolBar {
    display: grid;
    grid-template-columns: 300px 350px;
    row-gap: 15px;
    margin-bottom: 15px;
}
</style>